package com.ljs.service.imple;

import com.ljs.entity.Menu;
import com.ljs.respository.MenuMapper;
import com.ljs.service.MenuService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class MenuServiceImpl  implements MenuService {
    @Resource
    MenuMapper menuMapper;
    @Override
    public List<Menu> selAll(int  index, int  limit) {

        return menuMapper.selAll(index,limit);
    }

    @Override
    public List<Menu> all() {
        return menuMapper.all();
    }

    @Override
    public Menu selbyid(Integer id) {
        return menuMapper.selbyid(id);
    }

    @Override
    public List<Menu> selbyname(String name) {
        return menuMapper.selbyname(name);
    }

    @Override
    public int selcount() {
        return menuMapper.selcount();
    }

    @Override
    public boolean insertmenu(Menu menu) {
        return menuMapper.insertmenu(menu);
    }

    @Override
    public boolean updatemenu(Menu menu) {
        return menuMapper.updatemenu(menu);
    }

    @Override
    public boolean delete(Integer id) {
        return menuMapper.delete(id);
    }
}
